<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value=$title|default:'Params表管理'}}
{{assign var="app" value='params'}}
{{assign var="act" value='index'}}
{{assign var="td" value='8'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
{{include file="{{$smarty.const.PLUG}}chosen/chosen.html"}}
{{include file="{{$smarty.const.PLUG}}drag/drag.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form action="index.php" name='search' class="router" method="get">
		<input type="hidden" name="app" value="{{$app}}"/>
		<input type="hidden" name="item" value="{{$smarty.get.item}}"/>
		<input type="hidden" name="cat_id" value="{{$smarty.get.cat_id}}"/>
		  <ul class="bread">
		  	<li class="floatr">
				<a class="btn btn-success iframe" href="index.php?app=params&act=indexing&table={{$table}}"><i class="icon-refresh icon-white"></i>重新索引</a>
				<a class="btn btn-info" href="index.php?app=params&act=clear&table={{$table}}" target="_blank"><i class="icon-trash icon-white"></i>清理无用数据</a>
			</li>
			<li>
				主表名称：<input style="width:60px;" placeholder="如:datas" type="text" name="table" value="{{$table}}" />
			</li>
			<li>
				idid：<input class="input-mini" type="text" name="idid" value="{{$smarty.get.idid}}" />
			</li>
			<li>
				key：<input class="input-small" type="text" name="key" value="{{$smarty.get.key}}" />
			</li>
			<li>
				value：<input class="input-small" type="text" name="value" value="{{$smarty.get.value}}" />
			</li>
			<li>
				id：<input type="text" class="input-mini" name="id" value="{{$smarty.get.id}}" />
			</li>
			<li>
				<button type="submit" class="search btn btn-success"><i class="icon-search"></i>搜索</button>
			</li>
			<li>
				<a href="index.php?app={{$app}}&act={{$act}}{{if $smarty.get.cat_id}}&cat_id={{$smarty.get.cat_id}}{{/if}}{{if $smarty.get.item}}&item={{$smarty.get.item}}{{/if}}">清除</a>
			</li>
		  <ul>
	</form>
	</div>

	<form name='form' action="index.php?app={{$app}}" method="post">
	<input type="hidden" name="app" value="{{$app}}"/>
	<input type="hidden" name="act" value=""/>
	<input type="hidden" name="table" value="{{$table}}_params"/>
	<table class="table table-bordered">
		{{if $error}}
			<tr class="noline"><td colspan="{{$td}}" style="line-height:50px;font-size:20px;color:#da4f49;padding-left:15px;">{{$error}}</td></tr>
		{{elseif !$table}}
			<tr class="noline"><td colspan="{{$td}}" style="line-height:50px;font-size:20px;color:#da4f49;padding-left:15px;">请输入主表名称进行搜索!</td></tr>
		{{elseif !$result}}
			<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
			<tr class="thead">
			  <td colspan="{{$td}}">
			  <div class="floatr">
				<a class="delete btn btn-danger" href="javascript:"><i class="icon-trash icon-white"></i>批量删除</a>
			  </div>
			  ◆ {{$title}}管理
			  </td>
			</tr>
			<tr class="ttitle">
				<th width="20"><label><input class="check_all" type="checkbox"/></label></th>
				<th width="35">ID</th>
				<th width="150">key</th>
				<th width="40%">value</th>
				<th width="30">type</th>
				<th width="30">idid</th>
				<th width="30">adddate</th>
			</tr>
			<tbody>
				{{foreach from=$result item=val key=key}}
				<tr>
					{{*全选*}}<td><label><input name="check_id[]" class="check_id" value="{{$val.id}}" type="checkbox"/></label></td>
					{{*ID*}}<td>{{$val.id}}<input name="ids[]" value="{{$val.id}}" type="hidden"/></td>
					{{*key*}}<td>{{$val.key}}</td>
					{{*value*}}<td>{{$val.value}}</td>
					{{*type*}}<td>{{$val.type}}</td>
					{{*idid*}}<td>{{$val.idid}}</td>
					{{*adddate*}}<td>{{$val.adddate|date_format:"%Y-%m-%d %H:%M:%S"}}</td>
				</tr>
			    {{/foreach}}
				<tr class="noline ttitle">
				  <td colspan="{{$td}}">
					<a class="check_all btn"><i class="icon-ok"></i>全选/反选</a>
				  </td>
				</tr>
				<tr class="thead">
				  <td colspan="{{$td}}">
					{{include file="include/page.html"}}
				  </td>
				</tr>
			</tbody>
		{{/if}}
	</table>
	</form>
</div>
</div>

</body>
</html>